package com.dragon.modules.yuegou.query.busd;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.busd.DistrictServiceEntity;
import com.dragon.modules.yuegou.enums.busd.DistrictServiceStatus;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;
/**
 * 商圈服务表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-09-06 14:31:40
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class DistrictServiceQuery extends DistrictServiceEntity implements Query<DistrictServiceEntity> {
    /** ID查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈ID查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 服务名称查询条件 */
	@JsonUnwrapped(prefix = "serviceName")
	private Condition<String> serviceNameCondition;

    /** 服务介绍查询条件 */
	@JsonUnwrapped(prefix = "introduction")
	private Condition<String> introductionCondition;

    /** 服务热线查询条件 */
	@JsonUnwrapped(prefix = "hotLine")
	private Condition<String> hotLineCondition;

    /** 服务位置查询条件 */
	@JsonUnwrapped(prefix = "posation")
	private Condition<String> posationCondition;

    /** logo 地址查询条件 */
	@JsonUnwrapped(prefix = "logo")
	private Condition<String> logoCondition;

    /** 排序查询条件 */
	@JsonUnwrapped(prefix = "sortNo")
	private Condition<Integer> sortNoCondition;

    /** [枚举]状态：0-下架-LOWER、1-上架-UPPER查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<DistrictServiceStatus> statusCondition;

    /** 创建人ID查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 更新人ID查询条件 */
	@JsonUnwrapped(prefix = "modifiedBy")
	private Condition<String> modifiedByCondition;

    /** 更新时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 逻辑删除，1表示已删除,0表示未删除查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

    /** 删除人ID查询条件 */
	@JsonUnwrapped(prefix = "delBy")
	private Condition<String> delByCondition;

    /** 删除时间查询条件 */
	@JsonUnwrapped(prefix = "delTime")
	private Condition<LocalDateTime> delTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public DistrictServiceQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public DistrictServiceQuery(DistrictServiceEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public DistrictServiceQuery(DistrictServiceQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.serviceNameCondition != null) {
			this.serviceNameCondition = other.serviceNameCondition.copy();
		}
		if(other.introductionCondition != null) {
			this.introductionCondition = other.introductionCondition.copy();
		}
		if(other.hotLineCondition != null) {
			this.hotLineCondition = other.hotLineCondition.copy();
		}
		if(other.posationCondition != null) {
			this.posationCondition = other.posationCondition.copy();
		}
		if(other.logoCondition != null) {
			this.logoCondition = other.logoCondition.copy();
		}
		if(other.sortNoCondition != null) {
			this.sortNoCondition = other.sortNoCondition.copy();
		}
		this.setOther(other);
	}

	private void setOther(DistrictServiceQuery other){
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedByCondition != null) {
			this.modifiedByCondition = other.modifiedByCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
		if(other.delByCondition != null) {
			this.delByCondition = other.delByCondition.copy();
		}
		if(other.delTimeCondition != null) {
			this.delTimeCondition = other.delTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<DistrictServiceEntity> toQueryWrapper() {
		QueryWrapper<DistrictServiceEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (serviceNameCondition != null) {
			serviceNameCondition.toWrapper(wrapper, COL_SERVICE_NAME);
		}
		if (introductionCondition != null) {
			introductionCondition.toWrapper(wrapper, COL_INTRODUCTION);
		}
		if (hotLineCondition != null) {
			hotLineCondition.toWrapper(wrapper, COL_HOT_LINE);
		}
		if (posationCondition != null) {
			posationCondition.toWrapper(wrapper, COL_POSATION);
		}
		if (logoCondition != null) {
			logoCondition.toWrapper(wrapper, COL_LOGO);
		}
		return getQueryWrapper(wrapper);
	}

	private QueryWrapper<DistrictServiceEntity> getQueryWrapper(QueryWrapper<DistrictServiceEntity> wrapper){
		if (sortNoCondition != null) {
			sortNoCondition.toWrapper(wrapper, COL_SORT_NO);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedByCondition != null) {
			modifiedByCondition.toWrapper(wrapper, COL_MODIFIED_BY);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		if (delByCondition != null) {
			delByCondition.toWrapper(wrapper, COL_DEL_BY);
		}
		if (delTimeCondition != null) {
			delTimeCondition.toWrapper(wrapper, COL_DEL_TIME);
		}
		return wrapper;
	}
	
	/**
	 * 构造并返回ID查询条件
	 * 
	 * @return idCondition ID查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取ID查询条件
	 * 
	 * @return idCondition ID查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置ID查询条件
	 * 
	 * @param idCondition ID查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈ID查询条件
	 * 
	 * @return busdIdCondition 商圈ID查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈ID查询条件
	 * 
	 * @param busdIdCondition 商圈ID查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回服务名称查询条件
	 * 
	 * @return serviceNameCondition 服务名称查询条件
	 */
	public Condition<String> serviceName() {
		this.serviceNameCondition = new Condition<>();
		return this.serviceNameCondition;
	}
	
	/**
	 * 获取服务名称查询条件
	 * 
	 * @return serviceNameCondition 服务名称查询条件
	 */
	public Condition<String> getServiceNameCondition() {
		return serviceNameCondition;
	}

	/**
	 * 设置服务名称查询条件
	 * 
	 * @param serviceNameCondition 服务名称查询条件
	 */
	public void setServiceNameCondition(Condition<String> serviceNameCondition) {
		this.serviceNameCondition = serviceNameCondition;
	}

	/**
	 * 构造并返回服务介绍查询条件
	 * 
	 * @return introductionCondition 服务介绍查询条件
	 */
	public Condition<String> introduction() {
		this.introductionCondition = new Condition<>();
		return this.introductionCondition;
	}
	
	/**
	 * 获取服务介绍查询条件
	 * 
	 * @return introductionCondition 服务介绍查询条件
	 */
	public Condition<String> getIntroductionCondition() {
		return introductionCondition;
	}

	/**
	 * 设置服务介绍查询条件
	 * 
	 * @param introductionCondition 服务介绍查询条件
	 */
	public void setIntroductionCondition(Condition<String> introductionCondition) {
		this.introductionCondition = introductionCondition;
	}

	/**
	 * 构造并返回服务热线查询条件
	 * 
	 * @return hotLineCondition 服务热线查询条件
	 */
	public Condition<String> hotLine() {
		this.hotLineCondition = new Condition<>();
		return this.hotLineCondition;
	}
	
	/**
	 * 获取服务热线查询条件
	 * 
	 * @return hotLineCondition 服务热线查询条件
	 */
	public Condition<String> getHotLineCondition() {
		return hotLineCondition;
	}

	/**
	 * 设置服务热线查询条件
	 * 
	 * @param hotLineCondition 服务热线查询条件
	 */
	public void setHotLineCondition(Condition<String> hotLineCondition) {
		this.hotLineCondition = hotLineCondition;
	}

	/**
	 * 构造并返回服务位置查询条件
	 * 
	 * @return posationCondition 服务位置查询条件
	 */
	public Condition<String> posation() {
		this.posationCondition = new Condition<>();
		return this.posationCondition;
	}
	
	/**
	 * 获取服务位置查询条件
	 * 
	 * @return posationCondition 服务位置查询条件
	 */
	public Condition<String> getPosationCondition() {
		return posationCondition;
	}

	/**
	 * 设置服务位置查询条件
	 * 
	 * @param posationCondition 服务位置查询条件
	 */
	public void setPosationCondition(Condition<String> posationCondition) {
		this.posationCondition = posationCondition;
	}

	/**
	 * 构造并返回logo 地址查询条件
	 * 
	 * @return logoCondition logo 地址查询条件
	 */
	public Condition<String> logo() {
		this.logoCondition = new Condition<>();
		return this.logoCondition;
	}
	
	/**
	 * 获取logo 地址查询条件
	 * 
	 * @return logoCondition logo 地址查询条件
	 */
	public Condition<String> getLogoCondition() {
		return logoCondition;
	}

	/**
	 * 设置logo 地址查询条件
	 * 
	 * @param logoCondition logo 地址查询条件
	 */
	public void setLogoCondition(Condition<String> logoCondition) {
		this.logoCondition = logoCondition;
	}

	/**
	 * 构造并返回排序查询条件
	 * 
	 * @return sortNoCondition 排序查询条件
	 */
	public Condition<Integer> sortNo() {
		this.sortNoCondition = new Condition<>();
		return this.sortNoCondition;
	}
	
	/**
	 * 获取排序查询条件
	 * 
	 * @return sortNoCondition 排序查询条件
	 */
	public Condition<Integer> getSortNoCondition() {
		return sortNoCondition;
	}

	/**
	 * 设置排序查询条件
	 * 
	 * @param sortNoCondition 排序查询条件
	 */
	public void setSortNoCondition(Condition<Integer> sortNoCondition) {
		this.sortNoCondition = sortNoCondition;
	}

	/**
	 * 构造并返回[枚举]状态：0-下架-LOWER、1-上架-UPPER查询条件
	 * 
	 * @return statusCondition [枚举]状态：0-下架-LOWER、1-上架-UPPER查询条件
	 */
	public Condition<DistrictServiceStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取[枚举]状态：0-下架-LOWER、1-上架-UPPER查询条件
	 * 
	 * @return statusCondition [枚举]状态：0-下架-LOWER、1-上架-UPPER查询条件
	 */
	public Condition<DistrictServiceStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置[枚举]状态：0-下架-LOWER、1-上架-UPPER查询条件
	 * 
	 * @param statusCondition [枚举]状态：0-下架-LOWER、1-上架-UPPER查询条件
	 */
	public void setStatusCondition(Condition<DistrictServiceStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

	/**
	 * 构造并返回创建人ID查询条件
	 * 
	 * @return createdByCondition 创建人ID查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人ID查询条件
	 * 
	 * @return createdByCondition 创建人ID查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人ID查询条件
	 * 
	 * @param createdByCondition 创建人ID查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回更新人ID查询条件
	 * 
	 * @return modifiedByCondition 更新人ID查询条件
	 */
	public Condition<String> modifiedBy() {
		this.modifiedByCondition = new Condition<>();
		return this.modifiedByCondition;
	}
	
	/**
	 * 获取更新人ID查询条件
	 * 
	 * @return modifiedByCondition 更新人ID查询条件
	 */
	public Condition<String> getModifiedByCondition() {
		return modifiedByCondition;
	}

	/**
	 * 设置更新人ID查询条件
	 * 
	 * @param modifiedByCondition 更新人ID查询条件
	 */
	public void setModifiedByCondition(Condition<String> modifiedByCondition) {
		this.modifiedByCondition = modifiedByCondition;
	}

	/**
	 * 构造并返回更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置更新时间查询条件
	 * 
	 * @param modifiedTimeCondition 更新时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}
	
	/**
	 * 获取逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @return delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置逻辑删除，1表示已删除,0表示未删除查询条件
	 * 
	 * @param delCondition 逻辑删除，1表示已删除,0表示未删除查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

	/**
	 * 构造并返回删除人ID查询条件
	 * 
	 * @return delByCondition 删除人ID查询条件
	 */
	public Condition<String> delBy() {
		this.delByCondition = new Condition<>();
		return this.delByCondition;
	}
	
	/**
	 * 获取删除人ID查询条件
	 * 
	 * @return delByCondition 删除人ID查询条件
	 */
	public Condition<String> getDelByCondition() {
		return delByCondition;
	}

	/**
	 * 设置删除人ID查询条件
	 * 
	 * @param delByCondition 删除人ID查询条件
	 */
	public void setDelByCondition(Condition<String> delByCondition) {
		this.delByCondition = delByCondition;
	}

	/**
	 * 构造并返回删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> delTime() {
		this.delTimeCondition = new Condition<>();
		return this.delTimeCondition;
	}
	
	/**
	 * 获取删除时间查询条件
	 * 
	 * @return delTimeCondition 删除时间查询条件
	 */
	public Condition<LocalDateTime> getDelTimeCondition() {
		return delTimeCondition;
	}

	/**
	 * 设置删除时间查询条件
	 * 
	 * @param delTimeCondition 删除时间查询条件
	 */
	public void setDelTimeCondition(Condition<LocalDateTime> delTimeCondition) {
		this.delTimeCondition = delTimeCondition;
	}

}
